export function delay(time: number) {
  let resolve: (value: unknown) => void

  const promise = new Promise((res) => (resolve = res))

  setTimeout(() => resolve(null), time)

  return promise
}
